<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>																			
<%@ include file="/WEB-INF/view/jsp/base.jsp" %>																																			
<html lang="en">
<style>
.gradeA{
	cursor:pointer!important;
}
.widget-box tr td {
    text-align: left;
}
.mytable{
	border:1px solid #ddd;
    background-color: transparent;
    border-collapse: collapse;
    border-spacing: 0;
}
.mytable th{
   border:0px solid #ddd;
   padding:8px;
}
.mytable tr{
   border:1px solid #ddd;
}
.mytable td{
   padding:8px;
   text-align:left;
}
</style>
<body>																														
		<div id="content">																																										
		<div id="content-header"></div>																																						
		<div class="container-fluid">																																							
			<div class="widget-box">																																							
				<div class="widget-title">																																					
					<h5>集群配置管理</h5>																																									
			   
			    </div>																																											
				<div class="widget-content nopadding">		
				<table id="clusterConfMgrTable" url=""  class="mytable">																	
					<thead>																																									
						<tr role="row">																																					
							<th class="ui-state-default" role="columnheader"  style="text-align:left" name="sessionTypeName" primaryKey="true" >配置类型</th> 										
							<th class="ui-state-default" role="columnheader"  style="" name="localAdress">数量</th> 										
						</tr>																																								
					</thead>																																								
					<tbody id="sysParaTable-tbody" role="alert" aria-live="polite" aria-relevant="all">																										
					</tbody>																																								
				</table>																														
				</div>																																											
			</div>																																												
		</div>																																													
	</div>																																														
</body>	
<script type="text/javascript">																																						
$(document).ready(function(){
		$.ajax({
			url:"<%=path%>/clusterConfMgr/getClusterConfDetails",
			data:{},
			type:"post",
			success:function(text){
				var data = text.data;
				var _ths = [];      //标题行
					var $this = $(this) ;
					var tbody; 
					tbody+= '<tr class="gradeA">';
					tbody+='<td class="center">服务节点数量</td>';
					tbody+='<td>'+data["nodeAmount"]+'</td>';
					tbody+='</tr>';
					
					tbody+= '<tr class="gradeA">';
					tbody+='<td class="center">主机集群主机数量</td>';
					tbody+='<td>'+data["hostAmount"]+'</td>';
					tbody+='</tr>';
					
					tbody+= '<tr class="gradeA">';
					tbody+='<td class="center">交易码数量</td>';
					tbody+='<td>'+data["appAmount"]+'</td>';
					tbody+='</tr>';
					
					tbody+= '<tr class="gradeA">';
					tbody+='<td class="center">服务节点-交易码关系数量</td>';
					tbody+='<td>'+data["relationAmount"]+'</td>';
					tbody+='</tr>';
				$("#sysParaTable-tbody").html(tbody);
			}
		});
})

function loadData(data,_ths){
	console.log(_ths);
	var tbody = "";
	console.log(data);
	var i=0;
		for(var index in _ths){
			var tr = '<tr class="gradeA ">';
								console.log(data[_ths[index]]);
								var td_text = ((data[_ths[index]]==null)?"":data[_ths[index]]);
								tr+='<td class=" " >'+ td_text +'</td>';
								console.log(td_text);
				tr+= '</tr>' ;
				tbody+=tr;	 
						}
				
		 
	
	return tbody ;
}


</script>																																												
</html>	    																																												

